﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace SampleStockWP.Views
{
    public partial class EODChart : PhoneApplicationPage
    {
        public EODChart()
        {
            InitializeComponent();
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
                string sym = NavigationContext.QueryString["sym"];
                string ex = NavigationContext.QueryString["ex"];
                webBrowser1.Navigate(new Uri("http://chart.eoddata.com/" + "?e=" + ex + "&s=" + sym + "&w=490&h=400&t=1&bs=candle&ma=5-20&mat=SMA-SMA&i=MACD&b=BB", UriKind.Absolute));
        }

        private void PhoneApplicationPage_Loaded_1(object sender, RoutedEventArgs e)
        {
            string sym = NavigationContext.QueryString["sym"];
            string ex = NavigationContext.QueryString["ex"];
            webBrowser1.Navigate(new Uri("http://chart.eoddata.com/" + "?e=" + ex + "&s=" + sym + "&w=490&h=400&t=1&bs=candle&ma=5-20&mat=SMA-SMA&i=MACD&b=BB", UriKind.Absolute));
        }

        private void webBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            pbarWebClient.Visibility = System.Windows.Visibility.Collapsed;
            webBrowser1.Opacity = 1.0;
        } 
    }
}